#includes
include_directories( "./include" )

# files
file( GLOB sources ./src/*.[c]pp ./src/${POPUP_OSAL}/*.[c]pp )

# Shared library
#add_library( osal SHARED ${sources} )

# Static library
add_library( osal-static STATIC ${sources} )

# Install
#install( TARGETS osal DESTINATION ${POPUP_INSTALL_DIR}/lib )

# Windows specific stuff
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows)
  set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/3rdParty )
  find_package(pthread REQUIRED)
  include_directories( ${pthread_INCLUDE_DIRS} )
#  target_link_libraries( osal ${pthread_LIBRARY} ws2_32)
endif (${CMAKE_SYSTEM_NAME} STREQUAL Windows)
